<%@ Page Language="VB" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="false" CodeFile="Codes.aspx.vb" Inherits="Admin_Codes" title="Admin - Item Codes and Service Codes" %>
<%@ Register Src="SubNavControls/DropdownSubNavControl.ascx" TagName="DropDownSubNavControl" TagPrefix="uc1" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
<uc1:DropDownSubNavControl ID="DropDownSubNavControl1" runat="server" />

<div id="pageDiv" runat="server" style="height:300px; width:960px; overflow:auto;">
<table cellpadding="0" cellspacing="0" width="920px">
       <tr><td width="20px" rowspan="4"></td>
       <td><h1><a id="pagecontent">Admin - Service \ Item Codes</a></h1></td></tr>
            <tr>
                <td valign="top">
                
                <asp:UpdatePanel Id="ServiceCodeUpdatePanel" runat="server">
               <ContentTemplate>
                <cc2:ScrollingGridView ID="ServiceCodesScrollingGridview" runat="server" IsFixedColumn="true" CssClass="gridOffset" AutoGenerateColumns="False" Caption="Service Codes" CaptionAlign="top"
                                DataKeyNames="ServiceCodeId,ServiceCodeCategoryId" CellPadding="5" AllowPaging="False" PageSize="5" BorderColor="#21334B" 
                                BorderStyle="Solid" ShowFooter="True" GridLines="Vertical"  AllowSorting="true">
                        <HeaderStyle  CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
                        <RowStyle CssClass="adminColumnStyle" />
                        <Columns>
                            <asp:TemplateField HeaderText="Service Code" SortExpression="ServiceCode">
                                <ItemStyle Width="240px" />
                                 <HeaderStyle Width="255px" />
                                 <FooterStyle Width="255px" />
                                <ItemTemplate>
                                    <%#Eval("ServiceCode")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="ServiceCodeTextBox" runat="server" Text='<%#Eval("ServiceCode")%>' ToolTip="edit service code"></asp:TextBox>
                                </EditItemTemplate>
                                <FooterTemplate>
                                    <asp:TextBox ID="ServiceCodeFooterTextBox" runat="server" ToolTip="add service code"></asp:TextBox>
                                </FooterTemplate>
                            </asp:TemplateField>  
                            <asp:TemplateField HeaderText="Category">
                            <ItemStyle Width="215px" />
                            <HeaderStyle Width="215px" />
                            <FooterStyle Width="215px"></FooterStyle>
                            <ItemTemplate><%#Eval("ServiceCodeCategoryName")%></ItemTemplate>
                            <EditItemTemplate><asp:DropDownList ID="EditCategoryDropDownList" runat="server"></asp:DropDownList></EditItemTemplate>
                            <FooterTemplate><asp:DropDownList ID="AddCategoryDropDownList" runat="server"></asp:DropDownList></FooterTemplate>
                            </asp:TemplateField>                      
                            <asp:TemplateField HeaderText="Description" SortExpression="Description">
                                <ItemStyle Width="270px" />
                                <HeaderStyle Width="270px" />
                                <FooterStyle Width="270px" />
                                <ItemTemplate>
                                    <%#Eval("Description")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="ServiceDescriptionTextBox" runat="server" Text='<%#Eval("Description")%>' ToolTip="edit description"></asp:TextBox>
                                </EditItemTemplate>
                                <FooterTemplate>
                                    <asp:TextBox ID="ServiceDescriptionFooterTextBox" runat="server" ToolTip="add description"></asp:TextBox>
                                </FooterTemplate>
                            </asp:TemplateField>                        
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="ServiceEditLinkButton" runat="server" Text="Edit" CommandName="Edit"></asp:LinkButton>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:LinkButton ID="ServiceUpdateLinkButton" runat="server" Text="Update" CommandName="Update"></asp:LinkButton>
                                    &nbsp;
                                    <asp:LinkButton ID="ServiceCancelLinkButton" runat="server" Text="Cancel" CommandName="Cancel"></asp:LinkButton>
                                </EditItemTemplate>
                                <FooterTemplate>
                                    <asp:Button ID="ServiceAddNewButton" runat="server" Text="Add" Width="60px" CommandName="Add" />
                                </FooterTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="80px" />
                                <HeaderStyle Width="110px" />
                                <FooterStyle HorizontalAlign="Center" Width="110px" />
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                                No Service Codes to display.<br />
                           <table class="headerStyle" style="background-color:#C3CAD4" cellpadding="0" cellspacing="0" style="width:800px;">
                           <tr><td>Service Code:<asp:TextBox ID="AddServiceCodeTextBox" runat="server"></asp:TextBox></td>
                           <td>Category:<asp:DropDownList ID="AddCategoryDropdownList" runat="server"></asp:DropDownList></td>
                           <td>Service Description:<asp:TextBox ID="AddDescriptionTextBox" runat="server"></asp:TextBox></td>
                           <td><asp:Button ID="AddFirstServiceCodeButton" runat="server" Text="Add" OnClick="AddFirstServiceCode" /></td></tr></table>         
                        </EmptyDataTemplate>
                        <AlternatingRowStyle BackColor="#E8ECF4" />
                        <FooterStyle BackColor="lightsteelblue" />
                        <EmptyDataRowStyle CssClass="adminHeaderStyle" BackColor="#FFFFFF" />
                </cc2:ScrollingGridView>
                </ContentTemplate>
                </asp:UpdatePanel>
                    </td></tr>
                  <tr><td>
                    <asp:Button ID="AddFirstServiceCodeButton" runat="server" Text="Add" Visible="false" />
                </td>
            </tr>
            
            <tr>
                <td valign="top">
                   <asp:UpdatePanel Id="ItemCodeUpdatePanel" runat="server">
               <ContentTemplate>
                    <cc2:ScrollingGridView ID="ItemCodesScrollingGridView" IsFixedColumn="true" runat="server" CssClass="gridOffset" Width="800px" Caption="Item Codes" CaptionAlign="top" ToolTip="175"
                                AutoGenerateColumns="False" ShowFooter="True" AllowPaging="False" PageSize="5" DataKeyNames="ItemCodeId" CellPadding="5" BorderColor="#21334B" 
                                BorderStyle="Solid" GridLines="Vertical" AllowSorting="true">
                        <HeaderStyle  CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
                        <RowStyle CssClass="adminColumnStyle" />
                        <Columns>
                            <asp:TemplateField HeaderText="Item Code" SortExpression="ItemCode">
                                <ItemStyle Width="345px" />
                                <HeaderStyle Width="345px" />
                                <ItemTemplate>
                                    <%#Eval("ItemCode")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="ItemCodeTextBox" runat="server" Text='<%#Eval("ItemCode")%>' ToolTip="edit item code"></asp:TextBox>
                                </EditItemTemplate>
                                <FooterTemplate>
                                    <asp:TextBox ID="ItemCodeFooterTextBox" runat="server" ToolTip="add item code"></asp:TextBox>
                                </FooterTemplate>
                            </asp:TemplateField>                        
                            <asp:TemplateField HeaderText="Description" SortExpression="Description">
                                <ItemStyle Width="340px" />
                                <HeaderStyle Width="340px" />
                                <ItemTemplate>
                                    <%#Eval("Description")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="ItemDescriptionTextBox" runat="server" Text='<%#Eval("Description")%>' ToolTip="edit description"></asp:TextBox>
                                </EditItemTemplate>
                                <FooterTemplate>
                                    <asp:TextBox ID="ItemDescriptionFooterTextBox" runat="server" ToolTip="add description"></asp:TextBox>
                                </FooterTemplate>
                            </asp:TemplateField>                        
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="ItemEditLinkButton" runat="server" Text="Edit" CommandName="Edit"></asp:LinkButton>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:LinkButton ID="ItemUpdateLinkButton" runat="server" Text="Update" CommandName="Update"></asp:LinkButton>
                                    &nbsp;
                                    <asp:LinkButton ID="ItemCancelLinkButton" runat="server" Text="Cancel" CommandName="Cancel"></asp:LinkButton>
                                </EditItemTemplate>
                                <FooterTemplate>
                                    <asp:Button ID="ItemAddNewButton" runat="server" Text="Add" Width="60px" CommandName="Add" />
                                </FooterTemplate>
                                <HeaderStyle Width="100px" />
                                <ItemStyle HorizontalAlign="Center" Width="65px" />
                                <FooterStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                                No Item Codes to display.<br />
                           <table style="background-color:#C3CAD4;width:800px;" cellpadding="0" cellspacing="0"">
                           <tr><td>Item Code:<asp:TextBox ID="AddItemCodeTextBox" runat="server"></asp:TextBox></td>
                           <td>Service Description:<asp:TextBox ID="AddDescriptionTextBox" runat="server"></asp:TextBox></td>
                           <td><asp:Button ID="AddFirstItemCodeButton" runat="server" Text="Add" OnClick="AddFirstItemCode" /></td></tr></table>         
                        </EmptyDataTemplate>
                        
                        <AlternatingRowStyle BackColor="#E8ECF4" />
                        <FooterStyle BackColor="lightsteelblue" />
                        <EmptyDataRowStyle CssClass="adminHeaderStyle" BackColor="#C3CAD4" />
                    
                    </cc2:ScrollingGridView>
                    </ContentTemplate>
                    </asp:UpdatePanel>          
                </td>
            </tr>
        </table>   
  </div>
  
</asp:Content>
<asp:Content ID="FixedContent" runat="server" ContentPlaceHolderID="ContentPlaceHolderFixedAdmin">
  <asp:Label ID="MessageLabel" runat="server" CssClass="statusLabel"></asp:Label>          
</asp:Content>

